﻿using System;

namespace RestUpMVC.Resource
{
    [AttributeUsage(AttributeTargets.Class)]
    public class ResourceNameAttribute : Attribute
    {
        public string Name { get; private set; }

        public ResourceNameAttribute(string name)
        {
            if (name == null) throw new ArgumentNullException("name");
            if (string.Empty.Equals(name))
            {
                throw new ArgumentException(RestUpMVCResource.ResourceNameAttribute_ResourceNameAttribute_InvalidNameArgument, "name");
            }

            Name = name;
        }
    }
}